<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue07</title>
    <script src="./vue.min.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
    <div id="app">
        <p>{{info.name}}</p>
        <p>{{info.age}}</p>
        <p>{{info.study.前端}}</p>
    </div>
    
</body>
<script>
    var vm = new Vue({
        el:'#app',
        data() {
            return {
                info:{
                    name:null,
                    age:null,
                    study:{
                        "前端":null//这里不建议使用中文，仅为测试
                    },
                    what:[null]
                }
            }
        },
        mounted() {
            axios.get("../data.json")
            .then(res => {
                this.info = res.data;
            })
            .catch(err => {
                console.error(err); 
            })
        }
    })
</script>
</html>